I've created a DOORS addin which has both an explorer menu and a formal module menu which DOORS automatically creates (as a new top-level menu). How can I dynamically enable or disable menu items? The module menu has items which should only be enabled if certain attributes are present in the module.
The createMenu() function uses a mapping function, but DOORS is creating the menus for me automatically (from the addin directory configuration). Is there a function that I can call to enable/disable a menu item, or alternatively, is there another way for my addin to create the menus it needs?
TheNybbler - Fri Jul 17 11:34:00 EDT 2015 |
Re: How to dynamically enable/disable addin menu items hi !
The createMenu function introduces the createItem calls .... Here an example of mapping function (i use it to enable/disable functions in the popup menu ... )
int lock_allowed(){
Module mod = current Module
if (null mod) return null
if ( isShare mod ) return menuAvailable_
return menuUnavailable_
}
Enjoy ! |
Re: How to dynamically enable/disable addin menu items pommCannelle - Tue Jul 21 08:41:28 EDT 2015 hi !
The createMenu function introduces the createItem calls .... Here an example of mapping function (i use it to enable/disable functions in the popup menu ... )
int lock_allowed(){
Module mod = current Module
if (null mod) return null
if ( isShare mod ) return menuAvailable_
return menuUnavailable_
}
Enjoy ! Thanks for the tip, but I'm not creating the menus myself - they are being auto created by DOORS when it loads the addin. Do you know how I can enable/disable these auto-created menu items? |